﻿using System.Data.Services.Common;

namespace Cookbook.Services.Core.Domain
{
    [DataServiceKey("Id")]
    public class Product : Entity, IAggregateRoot
    {
        protected Product()
        {
        }

        public Product(string code, string name, decimal averagePriceInEuros)
        {
            Code = code;
            Name = name;
            AveragePriceInEuros = averagePriceInEuros;
        }

        public virtual string Code { get; private set; }

        public virtual string Name { get; private set; }

        public virtual decimal AveragePriceInEuros { get; private set; }
    }
}